home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / hot_36.zip / HOT.ASM next >
Assembly Source File  |  1993-05-02  |  1KB  |  104 lines

  1.     PROG    SEGMENT WORD PUBLIC 'PROG'
  2.     ASSUME    DS:PROG,CS:PROG
  3.     org    0
  4.     db    100h dup (?)
  5. tsr:    jmp    gostrt
  6. icopy    db    400h dup (?)
  7. oldkey    dw    0,0
  8. blksiz    dw    0
  9. blkadr    dw    0
  10. ;;;;;
  11. gokey:    pop    ds
  12.     pop    ax
  13.     jmp    cs:dword ptr oldkey
  14. mykey:    push    ax
  15.     push    ds
  16.     mov    ax,40h
  17.     mov    ds,ax
  18.     mov    al,ds:byte ptr 17h
  19.     and    al,0ch
  20.     cmp    al,0ch
  21.     jne    gokey
  22.     in    al,60h
  23.     and    al,7fh
  24.     cmp    al,82    ; INS key    
  25.     jne    gokey
  26. ; yes, eat the key
  27.     in    al,61h
  28.     mov    ah,al
  29.     or    al,80h
  30.     out    61h,al
  31.     xchg    ah,al
  32.     out    61h,al
  33.     mov    al,20h    ; non-specific EOI for 8259
  34.     out    20h,al
  35. ; do the HOT-BOOT
  36.     mov    ax,cs
  37.     mov    ds,ax
  38.     mov    ax,blkadr
  39.     mov    es,ax
  40.     mov    di,0
  41.     cld
  42.     mov    al,5ah
  43.     stosb
  44.     mov    ax,0
  45.     stosw
  46.     mov    ax,blksiz
  47.     stosw
  48.     sub    ax,ax
  49.     mov    es,ax
  50.     mov    ax,cs
  51.     mov    ds,ax
  52.     mov    si,offset icopy
  53.     mov    di,0
  54.     mov    cx,200h
  55.     rep    movsw
  56.     mov    bx,cs
  57.     mov    ah,50h    ; set psp
  58.     int    21h
  59.     mov    ax,4c00h
  60.     int    21h        
  61.     
  62. gostrt:
  63.     sub    ax,ax
  64.     mov    ds,ax
  65.     mov    cx,200h
  66.     cld
  67.     mov    si,ax
  68.     mov    di,offset icopy
  69.     rep    movsw
  70. ;
  71.     mov    ax,cs
  72.     mov    ds,ax
  73.     mov    ax,3509h    ; get int 9
  74.     int    21h
  75.     mov    oldkey,bx
  76.     mov    oldkey+2,es
  77.     mov    ax,2509h
  78.     mov    dx,offset mykey
  79.     int    21h
  80.  
  81.     mov    ax,cs
  82.     mov    es,ax
  83.     mov    bx,offset endpgm    
  84.     add    bx,15
  85.     mov    cl,4
  86.     shr    bx,cl
  87.     mov    dx,bx
  88.     mov    ax,cs
  89.     add    ax,dx
  90.     mov    blkadr,ax
  91.     mov    ah,4ah
  92.     int    21h
  93.     mov    bx,0ffffh
  94.     mov    ah,48h    ; how much is there ?
  95.     int    21h
  96.     mov    blksiz,bx
  97.     mov    ax,3100h
  98.     int    21h
  99.  
  100. endpgm    equ    $
  101.  
  102. PROG    ends
  103.     end    tsr
  104.